<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Data Endpoint Configuration Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__usbfs__dev__hal__functions__endpoint__config.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Data Endpoint Configuration Functions<div class="ingroups"><a class="el" href="group__group__usbfs__dev__drv.html">USBFS        (USB Full-Speed Device)</a> &raquo; <a class="el" href="group__group__usbfs__dev__drv__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>The Data Endpoint Configuration Functions provide an API to allocate and release hardware resources and override the memcpy function for the data endpoints. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga81b07ede74c6ad6b99e424afed5fffe7"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__endpoint__config.html#ga81b07ede74c6ad6b99e424afed5fffe7">Cy_USBFS_Dev_Drv_AddEndpoint</a> (USBFS_Type *base, <a class="el" href="structcy__stc__usb__dev__ep__config__t.html">cy_stc_usb_dev_ep_config_t</a> const *config, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *context)</td></tr>
<tr class="memdesc:ga81b07ede74c6ad6b99e424afed5fffe7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures a data endpoint for the following operation (allocates hardware resources for data endpoint).  <a href="#ga81b07ede74c6ad6b99e424afed5fffe7">More...</a><br /></td></tr>
<tr class="separator:ga81b07ede74c6ad6b99e424afed5fffe7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga732e3eb9471c9587f3305eaacb4cd1a2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__endpoint__config.html#ga732e3eb9471c9587f3305eaacb4cd1a2">Cy_USBFS_Dev_Drv_RemoveEndpoint</a> (USBFS_Type *base, uint32_t endpointAddr, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *context)</td></tr>
<tr class="memdesc:ga732e3eb9471c9587f3305eaacb4cd1a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes a data endpoint (release hardware resources allocated by data endpoint).  <a href="#ga732e3eb9471c9587f3305eaacb4cd1a2">More...</a><br /></td></tr>
<tr class="separator:ga732e3eb9471c9587f3305eaacb4cd1a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga73f805a814fa4a1c66dc4224d2002319"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__usbfs__dev__hal__functions__endpoint__config.html#ga73f805a814fa4a1c66dc4224d2002319">Cy_USBFS_Dev_Drv_OverwriteMemcpy</a> (USBFS_Type const *base, uint32_t endpoint, <a class="el" href="group__group__usbfs__dev__drv__data__structures.html#gaece00619a6241ca4ed9b05bd937269c1">cy_fn_usbfs_dev_drv_memcpy_ptr_t</a> memcpyFunc, <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *context)</td></tr>
<tr class="memdesc:ga73f805a814fa4a1c66dc4224d2002319"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overwrites the memory copy (memcpy) function used to copy data with the user- implemented:  <a href="#ga73f805a814fa4a1c66dc4224d2002319">More...</a><br /></td></tr>
<tr class="separator:ga73f805a814fa4a1c66dc4224d2002319"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga81b07ede74c6ad6b99e424afed5fffe7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga81b07ede74c6ad6b99e424afed5fffe7">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_AddEndpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a> Cy_USBFS_Dev_Drv_AddEndpoint </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usb__dev__ep__config__t.html">cy_stc_usb_dev_ep_config_t</a> const *&#160;</td>
          <td class="paramname"><em>config</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures a data endpoint for the following operation (allocates hardware resources for data endpoint). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">config</td><td>The pointer to data endpoint configuration <a class="el" href="structcy__stc__usb__dev__ep__config__t.html">cy_stc_usb_dev_ep_config_t</a>.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status code of the function execution <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>. </dd></dl>

</div>
</div>
<a id="ga732e3eb9471c9587f3305eaacb4cd1a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga732e3eb9471c9587f3305eaacb4cd1a2">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_RemoveEndpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a> Cy_USBFS_Dev_Drv_RemoveEndpoint </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpointAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes a data endpoint (release hardware resources allocated by data endpoint). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpointAddr</td><td>The data endpoint address (7 bit - direction, 3-0 bits - endpoint number).</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status code of the function execution <a class="el" href="group__group__usbfs__dev__drv__enums.html#gace2573b482baf5a2a0f796b72cc244ac">cy_en_usbfs_dev_drv_status_t</a>. </dd></dl>

</div>
</div>
<a id="ga73f805a814fa4a1c66dc4224d2002319"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga73f805a814fa4a1c66dc4224d2002319">&#9670;&nbsp;</a></span>Cy_USBFS_Dev_Drv_OverwriteMemcpy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_USBFS_Dev_Drv_OverwriteMemcpy </td>
          <td>(</td>
          <td class="paramtype">USBFS_Type const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__usbfs__dev__drv__data__structures.html#gaece00619a6241ca4ed9b05bd937269c1">cy_fn_usbfs_dev_drv_memcpy_ptr_t</a>&#160;</td>
          <td class="paramname"><em>memcpyFunc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Overwrites the memory copy (memcpy) function used to copy data with the user- implemented: </p>
<ul>
<li><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga3699408b8336670b36c2e7a3fa6949d7">Cy_USBFS_Dev_Drv_ReadOutEndpoint</a> copies data from from the internal buffer to the application buffer for OUT endpoint.</li>
<li><a class="el" href="group__group__usbfs__dev__hal__functions__data__xfer.html#ga65db7019eafec3e38e8fbca316f92673">Cy_USBFS_Dev_Drv_LoadInEndpoint</a> copies data from the application buffer for IN endpoint to the the internal buffer. Only applicable when endpoint management mode is <a class="el" href="group__group__usbfs__dev__drv__enums.html#ggaaf6cf71cc366279eb82aefed4f81e2d1aad338d6b20d33a6cff7f47e2b883ddec">CY_USBFS_DEV_DRV_EP_MANAGEMENT_DMA_AUTO</a>.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the USBFS instance.</td></tr>
    <tr><td class="paramname">endpoint</td><td>The data endpoint number.</td></tr>
    <tr><td class="paramname">memcpyFunc</td><td>The pointer to the function that copies data.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__usbfs__dev__drv__context__t.html">cy_stc_usbfs_dev_drv_context_t</a> allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
